#!/bin/bash

RSEED=1337

rm ./data/*

echo "running ..."
for i in 0 1 2 3
do
	echo "gcc -o$i ..."
	for j in 10 100 500 1000 10000
	do
		./bin/mvmult_sp_o$i $RSEED $j >> ./data/res_sp_o$i.txt
		./bin/mvmult_dp_o$i $RSEED $j >> ./data/res_dp_o$i.txt
		./bin/mvmult_ep_o$i $RSEED $j >> ./data/res_ep_o$i.txt
		./bin/mvmult_sp_ofast $RSEED $j >> ./data/res_sp_ofast.txt
		./bin/mvmult_dp_ofast $RSEED $j >> ./data/res_dp_ofast.txt
		./bin/mvmult_ep_ofast $RSEED $j >> ./data/res_ep_ofast.txt
	done
done
echo "gcc -ofast ..."
for k in 10 100 500 1000 10000
do
	./bin/mvmult_sp_ofast $RSEED $k >> ./data/res_sp_ofast.txt
	./bin/mvmult_dp_ofast $RSEED $k >> ./data/res_dp_ofast.txt
	./bin/mvmult_ep_ofast $RSEED $k >> ./data/res_ep_ofast.txt
done

echo "gnuplot ..."
gnuplot plot.gnuplot

